{include file=member.header.html}
<script type="text/javascript">
    $(function () {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
        
        $('a[ectype="batchpay"]').click(function() {
            if ($('.checkitem:checked').length == 0) {
                return false;
            }
            if ($(this).attr('presubmit')) {
                if (!eval($(this).attr('presubmit'))) {
                    return false;
                }
            }
            var items = '';
            $('.checkitem:checked').each(function() {
                items += this.value + ',';
            });
            items = items.substr(0, (items.length - 1));

            var uri = $(this).attr('uri');
            uri = uri + '&batch=1&' + $(this).attr('name') + '=' + items;
            window.open(uri); 
        });
    });
</script>
<style type="text/css">
    .float_right {float: right;}
</style>
<div class="content">
    {include file=member.menu.html}
    <div id="right">
        {include file=member.curlocal.html}
        {include file=member.submenu.html}
        <div class="wrap">
            <div class="public_index table">
                <table>
                    <tr class="line_bold">
                        <!--lichen 2019/9/5 start-->
                        <th colspan="12">
                        <!--<th colspan="8">-->
                        <!--lichen 2019/9/5 end-->
                    <div class="user_search">
                        <form method="get">
                            <!--{if $query.seller_name or $query.add_time_from or $query.add_time_to or $query.order_sn}-->
                            <a class="detlink float_right" href="{url app=buyer_order}">{$lang.cancel_query}</a>
                            <!--{/if}-->
                            <span>{$lang.add_time}: </span>
                            <input type="text" class="text1 width2" name="add_time_from" id="add_time_from" value="{$query.add_time_from}"/> &#8211;
                            <input type="text" class="text1 width2" name="add_time_to" id="add_time_to" value="{$query.add_time_to}"/>
                            <span>{$lang.order_sn}:</span>
                            <input type="text" class="text1 width_normal" name="order_sn" value="{$query.order_sn|escape}">
                            <span>{$lang.order_status}</span>
                            <select name="type">
                                {html_options options=$types selected=$type}
                            </select>
                            <input type="hidden" name="app" value="buyer_order" />
                            <input type="hidden" name="act" value="index" />
                            <input type="submit" class="btn" value="{$lang.soso}" />
                        </form>
                    </div>
                    </th>
                    </tr>
                    <tr class="line gray">
                        <th>{$lang.goods_name}</th>
                        <th>{$lang.price}</th>
                        <th>{$lang.quantity}</th>
                        <th></th>
                        <th>{$lang.payment_name}</th>
                        <th>{$lang.order_amount}</th>
                        <th>{$lang.order_status}</th>
                        <!--lichen 2019/5/5 start-->
                        <th>{$lang.customs_status}</th>
                        <!--lichen 2019/5/5 end-->
                        <th>{$lang.evaluation}</th>
                    </tr>
                    <!--{if $orders}-->
                    <!--lichen 2019/5/5 start-->
                    <!--<tr class="sep-row"><td colspan="8"></td></tr>-->
                    <tr class="sep-row"><td colspan="12"></td></tr>
                    <!--lichen 2019/5/5 end-->
                    <tr class="operations">
                        <!--lichen 2019/9/5 start-->
                        <th colspan="12">
                        <!--<th colspan="8">-->
                        <!--lichen 2019/9/5 end-->
                    <p class="position0 clearfix">
                        <input type="checkbox" id="all" class="checkall"/>
                        <label for="all">{$lang.checkall}</label>
                        <a href="javascript:;" class="pay" ectype="batchpay" uri="index.php?app=cashier" name="order_id_array">{$lang.payment}</a>
                    </p>
                    <p class="position2 clearfix">
                        {include file=member.page.top.html}
                    </p>
                    </th>
                    </tr>
                    <!--{/if}-->
                    <!--{foreach from=$orders item=order}-->
                    <tr class="sep-row"><td colspan="8"></td></tr>
                    <tr class="line-hd">
                        <!--lichen 2019/9/5 start-->
                        <th colspan="12">
                        <!--<th colspan="8">-->
                        <!--lichen 2019/9/5 end-->
                    <p>
                        <input type="checkbox" value="{$order.order_id}" class="checkitem" <!--{if $order.status neq ORDER_PENDING}--> disabled="disabled" <!--{/if}-->/>
                               <label>{$lang.order_sn}：</label>{$order.order_sn}
                        <label>{$lang.add_time}：</label>{$order.add_time|date:Y-m-d H:i:s}
                        <!--{if $order.status eq ORDER_SHIPPED && $order.payment_code neq 'cod' && $order.payment_code neq 'bank' && $order.payment_code neq 'post'}-->
                        <strong style="color:red;padding-left: 10px;">{$order.auto_finished_time|date:Y-m-d H:i:s}</strong><label>{$lang.system_will_take_delivery}</label>
                        <!--{/if}-->
                        <a href="{url app=store&id=$order.seller_id}" target="_blank" style="margin-left:15px;">{$order.seller_name|escape}</a>
                        <!--{if $order.seller_info.im_qq}-->
                        <a href="http://wpa.qq.com/msgrd?V=1&amp;uin={$order.seller_info.im_qq|escape}&amp;Site={$store.store_name|escape}&amp;Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{$order.seller_info.im_qq|escape}:5" alt="QQ" ></a>
                        <!--{elseif $order.seller_info.im_aliww}-->
                        <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid={ $order.seller_info.im_aliww|escape:url}&site=cntaobao&s=1&charset={$charset}" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={ $order.seller_info.im_aliww|escape:url}&site=cntaobao&s=1&charset={$charset}" alt="Wang Wang" align="absmiddle" /></a>
                        <!--{else}-->
                        <a target="_blank" href="{url app=message&act=send&to_id=$order.seller_id}" class="email"></a>
                        <!--{/if}-->
                        &nbsp;<a href="{url app=customer_message&type=2&store_id=$order.seller_id}" target="_blank">{$lang.complain_this_store}</a>
                    </p>
                    </th>
                    </tr>
                    <!--{foreach from=$order.order_goods item=goods name=fe_goods}-->
                    <tr class="line<!--{if $smarty.foreach.fe_goods.last}--> last_line<!--{/if}-->">
                        <td valign="top" class="first clearfix">
                            <div class="pic-info fleft">
                                <a href="{url app=goods&id=$goods.goods_id}" target="_blank"><img src="{$goods.goods_image}" width="50" height="50" /></a>
                            </div>
                            <div class="txt-info fleft">
                                <div class="txt">
                                    <a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name}</a>
                                </div>
                                <!--{if $goods.specification}--><p class="gray-color mt5">{$goods.specification}</p><!--{/if}-->
                            </div>

                        </td>
                        <td class="align2">{$goods.price|price}<br/><!--{if $goods.goods_type neq GOODS_TYPE_NORMAL}--><strong>({$goods.goods_type|modifier:goods_type_status})</strong><!--{/if}--></td>
                        <td class="align2">{$goods.quantity}</td>
                        <td class="align2">
                            <!--{if $goods.status eq 'SUCCESS'}-->
                            <a href="{url app=buyer_order&act=view&order_id=$goods.order_id}" class="gray">{$lang.has_confirm}</a>
                            <!--{elseif $goods.refund_status eq 'SUCCESS'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund_succed}</a>
                            <!--{elseif $goods.refund_status eq 'CLOSED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" class="gray">{$lang.refund_colse}</a>
                            <!--{elseif $goods.refund_status eq 'FAILED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" style="color:#ff6600">{$lang.refund_fail}</a>
							<!--{elseif $goods.refund_status eq 'WAIT_SELLER_AGREE'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund}</a>
							<!--{elseif $goods.refund_status eq 'WAIT_SELLER_CONFIRM'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund}</a>
                            <!--{elseif $goods.refund_status eq 'ADD'}-->
                            <a href="{url app=refund&act=add&order_id=$order.order_id&goods_id=$goods.goods_id&spec_id=$goods.spec_id}">{$lang.Refund}</a>
                            <!--{/if}-->
                            <br/><a href="{url app=customer_message&type=3&goods_id=$goods.goods_id}" target="_blank">{$lang.complain_this_goods}</a>
                        </td>
                        <!--{if $smarty.foreach.fe_goods.first}-->
                        <td valign="top" class="align2 bottom-blue" rowspan="{$order.goods_quantities}">
                            <div class="mt15"><!--{if $order.payment_name}-->{$order.payment_name|escape}<!--{/if}--></div>
                        </td>
                        <td valign="top" class="align2 bottom-blue" rowspan="{$order.goods_quantities}">
                            <div class="mt15"><b id="order{$order.order_id}_order_amount">{$order.order_amount|price}{if $order.pd_amount>0}({$lang.used_remain}{$order.pd_amount}){/if}</b></div>
                            <!--{if $enable_express}-->
                            <a target="_blank" class="btn1"  href="{url app=order_express&amp;order_id=$order.order_id}" {if $order.status neq ORDER_SHIPPED && $order.status neq ORDER_FINISHED} style="display:none"{/if}>{$lang.view_delivery_track}</a>
                            <!--{/if}-->
                        </td>
                        <td valign="top" width="100" class="align2 bottom-blue" rowspan="{$order.goods_quantities}">
                            <div class="btn-order-status">
                                <p><span class="{if $order.status==0}gray-color{else}color4{/if}">{$order.status|modifier:order_status}</span></p>

                                <!--//查看订单-->
                                <a href="{url app=buyer_order&act=view&order_id=$order.order_id}" target="_blank">{$lang.view_order}</a>
                                <!--{if $order.status eq ORDER_SHIPPED && $order.payment_code neq 'cod' && $order.payment_code neq 'bank' && $order.payment_code neq 'post'}-->
                                <a href="{url app=buyer_order&act=delay_auto_finished_time&order_id=$order.order_id}" >{$lang.extend_take_delivery_three_days}</a>
                                <!--{/if}-->

                                <a href="{url app=cashier&order_id=$order.order_id}" target="_blank" id="order{$order.order_id}_action_pay"{if $order.status neq ORDER_PENDING} style="display:none"{/if} class="btn-order-status-pay">{$lang.pay}</a>
                                <a href="javascript:;" ectype="dialog" dialog_id="buyer_order_confirm_order" dialog_width="400" dialog_title="{$lang.confirm_order}" uri="index.php?app=buyer_order&amp;act=confirm_order&order_id={$order.order_id}&ajax"  id="order{$order.order_id}_action_confirm"{if $order.status neq ORDER_SHIPPED or $order.payment_code eq 'cod'} style="display:none"{/if} />{$lang.confirm_order}</a>

                                <!--//取消订单 不是取消和完成的订单就可以取消-->
                                <a href="javascript:;" ectype="dialog" dialog_width="400" dialog_title="{$lang.cancel_order}" dialog_id="buyer_order_cancel_order" uri="index.php?app=buyer_order&amp;act=cancel_order&order_id={$order.order_id}&ajax"  id="order{$order.order_id}_action_cancel"{if $order.status neq ORDER_PENDING and $order.status neq ORDER_SUBMITTED} style="display:none"{/if} />{$lang.cancel_order}</a>
                                <a href="{url app=buyer_order&act=orderprint&order_id=$order.order_id}" target="_blank">{$lang.print_detail}</a>
                                <a href="{url app=buyer_order&act=change_payment&order_id=$order.order_id}" target="_blank" {if $order.status neq ORDER_PENDING} style="display:none"{/if}>{$lang.change_pay}</a>
                            </div>
                        </td>
                        <!--lichen 2019/5/5 start-->
                        <td valign="top"class="align2 bottom-blue" rowspan="{$order.goods_quantities}">
                            <!--{if $order.customs_status eq CUSTOMS_SUCCESS}-->
                            <p class="gray-color">{$lang.customs_success}</p>
                            <!--{elseif $order.customs_status eq CUSTOMS_PROCESS}-->
                            <p class="gray-color">{$lang.customs_process}</p>
                            <!--{elseif $order.customs_status eq CUSTOMS_FAILDED}-->
                            <p class="gray-color">{$lang.customs_failded}</p>
                            <!--{else}-->
                            <p class="gray-color">{$lang.customs_submit}</p>
                            <!--{/if}-->
                            <!--//查看订单-->
                            <a href="{url app=buyer_order&act=customs&order_id=$order.order_id}" target="_blank">{$lang.view_customs}</a>
                        </td>
                        <!--lichen 2019/5/5 end-->
                        <td width="60" class="align2 bottom-blue last" valign="top" rowspan="{$order.goods_quantities}">
                            <!--{if $order.evaluation_status eq 1}-->                            
                            <p class="gray-color">{$lang.me_evaluated}</p>
                            {elseif $order.evaluation_status eq 0 && $order.status eq ORDER_FINISHED&& $goods.refund_status neq 'SUCCESS'&& $goods.refund_status neq 'CLOSED'}                           
                            <a class="btn1" href="{url app=buyer_order&act=evaluate&order_id=$order.order_id}" target="_blank" id="order{$order.order_id}_evaluate">{$lang.evaluate}</a>
                            {else}
                            <!--{/if}-->
                        </td>
                        <!--{/if}-->
                    </tr>
                    <!--{/foreach}-->
                    <!--{foreachelse}-->
                    <tr><td class="member_no_records" colspan="8">{$lang.no_records}</td></tr>
                    <!--{/foreach}-->
                    <!--{if $orders}-->
                    <tr class="sep-row">
                        <td colspan="8"></td>
                    </tr>
                    <tr class="operations">
                        <!--lichen 2019/9/5 start-->
                        <!--<th colspan="12">-->
                        <th colspan="8">
                        <!--lichen 2019/9/5 end-->
                    <p class="position1 clearfix">
                        <input type="checkbox" id="all2" class="checkall"/>
                        <label for="all2">{$lang.checkall}</label>
                        <a href="javascript:;" class="pay" ectype="batchpay" uri="index.php?app=cashier" name="order_id_array">{$lang.payment}</a>
                    </p>
                    <p class="position2 clearfix">
                        {include file=member.page.bottom.html}
                    </p>
                    </th>
                    </tr>
                    <!--{/if}-->
                </table>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<iframe id='iframe_post' name="iframe_post" src="about:blank" frameborder="0" width="0" height="0"></iframe>
{include file=footer.html}
